﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccountDetails.aspx.cs"
    Inherits="Golf.WebUI.Customers.AccountDetails" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

    <script src="../Script/jquery/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>

    <style type="text/css">
        .container
        {
            width: 630px;
            overflow: auto;
        }
        .container1
        {
            padding: 20px 30px;
        }
        a:hover.btn_update
        {
            background-position: 0px -35px;
        }
        a.btn_update
        {
            width: 109px;
            height: 0 !important;
            padding-top: 31px;
            overflow: hidden;
            display: block;
            background: url(/common/images/shell/btn_update.png) no-repeat 0 0;
            float: right;
        }
        p.copy
        {
            clear: both;
            font-size: 12px;
            margin-bottom: 10px;
        }
        .container1 h3
        {
            margin-bottom: 10px;
            font-size: 1.3em;
            font-weight: bold;
        }
        .container1 div.txt_Div
        {
            float: left;
            width: 183px;
            text-align: right;
            padding-right: 12px;
            clear: both;
            font-weight: bold;
            line-height: 30px;
        }
        .container1 input[type=text], input[type=password], textarea
        {
            border: 1px solid #ccc;
            padding: 3px;
            padding-left: 5px;
            padding-right: 10px;
            height: 20px;
            line-height: 25px;
            width: 200px;
            font-size: 15px;
            margin-top: 2px;
        }
        .container1 input[type=text]:focus, input[type=password]:focus, textarea:focus
        {
            border: 1px solid #8bbd05;
            border-style: dashed;
            background-color: Transparent;
        }
        *
        {
            margin: 0;
            padding: 0;
        }
        .container1 div div
        {
            height: 30px;
            line-height: 30px;
        }
    </style>

    <script type="text/javascript">
        $(function() {
            $("#btnUpdate").click(function() {
                var txtName = $("#txtName").val();
                var txtOldPasswordEmail = $("#txtOldPasswordEmail").val();
                var txtEmail = $("#txtEmail").val();
                var txtConfirmMail = $("#txtConfirmMail").val();
                var txtOldPassword = $("#txtOldPassword").val();
                var txtPassword = $("#txtPassword").val();
                var txtPassword_compare = $("#txtPassword_compare").val();
                if (txtOldPassword == "") { alert("密码不能为空"); }
                if (txtPassword != txtPassword_compare) { alert("两次输入的密码不一致"); }
                else {
                    $.ajax({
                        type: "POST",
                        contentType: "application/x-www-form-urlencoded",
                        url: "../AdminShow/Ajax/LoginUser.aspx?" + Math.random(),
                        data: {
                            "action": "details",
                            "postcode": txtName,
                            "NewEmail": txtOldPasswordEmail,
                            "NewEmail1": txtEmail,
                            "ConfirmMail": txtConfirmMail,
                            "oldPwd": txtOldPassword,
                            "NewPwd": txtPassword,
                            "NewPwd1": txtPassword_compare
                        },
                        success: function(msg) {
                        },
                        error: function(xhr) {
                            alert(xhr.responseText);
                        }
                    });
                }
            });
        }); 
    </script>

</head>
<body style="width: 690px; background: none; background-color: #eee">
    <form id="form1" runat="server" style="width: 690px; background-color: #eee">
    <div>
        <div class="container">
            <div class="container1">
                <h3>
                    Change your Name</h3>
                <p class="copy">
                    To change your name, enter your new details and click the 'Update' button.</p>
                <div id="con_txtName" style="height: 30px; line-height: 30px;">
                    <div class="txt_Div">
                        First Name*:</div>
                    <input name="txtName" type="text" value="<%=txtName %>" id="txtName" />
                    <div class="txt_Div">
                        Last Name*:</div>
                    <input name="txtName" type="text" value="<%=txtName %>" id="lastName" />
                    <a id="A1" class="btn_update" href="#">Update</a><div class="txt_Div">
                    </div>
                </div>
            </div>
        </div>
        <div class="container">
            <div class="container1">
                <h3>
                    Change your Email Address</h3>
                <p class="copy">
                    To change your email address, enter your current password and new email address
                    then click the 'update' button.</p>
                <div class="userTxtInputEmail">
                    <div id="con_txtpwd" class="">
                        <div class="txt_Div">
                            Password*:</div>
                        <input name="txtOldPasswordEmail" type="password" id="txtOldPasswordEmail">&nbsp;
                    </div>
                    <div id="con_txtEmail" class="">
                        <div class="txt_Div">
                            New Email Address*:</div>
                        <input name="txtEmail" type="text" id="txtEmail">
                    </div>
                    <div id="con_Email_compare">
                        <div class="txt_Div">
                            Confirm New Email*:</div>
                        <input name="txtConfirmMail" type="text" id="txtConfirmMail">
                    </div>
                    <a id="A2" class="btn_update" href="#">Update</a><div class="txt_Div">
                    </div>
                </div>
            </div>
        </div>
        <div class="container">
            <div class="container1">
                <h3>
                    Change your Password</h3>
                <p class="copy">
                    Enter your new password twice so we can check that you have typed it correctly.<br>
                    <br>
                </p>
                <p class="copy">
                    Please only use letters and numbers in your password. Your password must be at least
                    8 characters in length and contain a mixture of letters and at least 2 numbers.</p>
                <div class="userTxtInput">
                    <div id="con_txtOldPassword" class="">
                        <div class="txt_Div">
                            Old Password*:</div>
                        <input name="txtOldPassword" type="password" id="txtOldPassword">
                    </div>
                    <div id="con_txtPassword" class="">
                        <div class="txt_Div">
                            New Password*:</div>
                        <input name="txtPassword" type="password" id="txtPassword">
                    </div>
                    <div id="con_txtPassword_compare">
                        <div class="txt_Div">
                            Confirm Password*:</div>
                        <input name="txtPassword_compare" type="password" id="txtPassword_compare">
                    </div>
                    <a id="A3" class="btn_update" href="#">Update</a>
                    <div class="txt_Div">
                    </div>
                </div>
            </div>
        </div>
        <div class="container">
            <div class="container1">
                <h3>
                    Monthly Newsletter</h3>
                <p class="copy">
                    Choose if you wish to subscribe or unsubscribe from the Online Golf newsletter.</p>
                <div class="newsletter">
                    <input id="rboSubscribe" type="radio" name="newsletter" value="rboSubscribe" checked="checked">
                    Subscribe
                    <input id="rboUnsubscribe" type="radio" name="newsletter" value="rboUnsubscribe">Unsubscribe
                </div>
                <a id="A4" class="btn_update" href="#">Update</a>
                <br />
                <div class="txt_Div">
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>

<script src="../Script/common/bRoundCurve-1.0.js" type="text/javascript"></script>

<script type="text/javascript">
    b_RoundCurve("container", "#eeeeee", "#f7f7f7", 1);
</script>

